import { getUser } from '@/api/employees'
export default {
  namespaced: true,
  state: {
    tableData: [],
    total: 0,
    dialogVisible: false
  },
  mutations: {
    setUser(state, data) {
      state.tableData = data.rows
      state.total = data.total
    },
    change(state, flag) {
      state.dialogVisible = flag
    }
  },
  actions: {
    async getUser(context, data) {
      const res = await getUser(data)
      context.commit('setUser', res.data)
    }
  }
}
